package com.atguigu.springcloud.config;

import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhangshihao
 * @create 2023-03-20 8:49
 */
// @Configuration
// public class GetWayConfig {
//     @Bean
//     public RouteLocator customRouteLocator(RouteLocatorBuilder routeLocatorBuilder){
//         RouteLocatorBuilder.Builder routes = routeLocatorBuilder.routes();
//
//         // https://news.baidu.com/
//         routes.route("path_route_atguigu", r -> r.path("/question/353828345/answer/2944016556").uri("https://www.zhihu.com/")).build();
//         return routes.build();
//     }
// }
